﻿<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
    <script type="text/javascript" src="../knockout-3.0.0.js"></script>
</head>
<body>   
    <div data-bind="template: { name: 'human', data: bigShotMediaGuy }"></div>
    <div data-bind="template: { name: 'human', data: lowlyAssistant }"></div>

    <script type="text/html" id="human">
        <p>Name: <span data-bind="text: name"></span></p>
        <p>Cash: <span data-bind="text: cash"></span></p>
    </script>

    <script>
        var model = {
            bigShotMediaGuy: { name: 'Diamond Joe Quimby', cash: 10000 },
            lowlyAssistant: { name: 'Gil Gunderson', cash: 'two bits' }
        };
        ko.applyBindings(model);
    </script>
</body>
</html>